﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Goldlight.Mvvm.Base;

namespace Goldlight.SampleApplication.ViewModels
{
    /// <summary>
    /// This class encapsulates a list of roles the user may, or may not, belong to.
    /// </summary>
    public class RoleViewModel : ViewModelBase
    {
        private string _roleName;
        private bool _isActive;

        /// <summary>
        /// The name of the role.
        /// </summary>
        public string RoleName
        {
            get { return _roleName; }
            set 
            {
                if (_roleName != value)
                {
                    _roleName = value;
                    OnChanged(() => RoleName);
                }
            }
        }
        /// <summary>
        /// Is the user active in this role or not?
        /// </summary>
        public bool IsActive
        {
            get { return _isActive; }
            set 
            {
                if (_isActive != value)
                {
                    _isActive = value;
                    OnChanged(()=>IsActive);
                }
            }
        }
    }
}
